package com.service.impl;

import com.dao.HccgMapper;
import com.model.Hccg;
import com.service.HccgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class HccgServiceImpl implements HccgService  {
    @Autowired
    private HccgMapper hccgMapper;

        // 添加
    @Override
    public void add(Hccg hccg) {
        System.out.println(hccg);
        hccgMapper.add(hccg);
    }

        //查询
    @Override
    public List<Hccg> query(Map<String, Object> map) {
        List<Hccg> query = hccgMapper.query(map);
        System.out.println(query);
        return query;
    }

        //根据id查询
    @Override
    public Hccg select(Integer id) {
        return hccgMapper.select(id);
    }

        // 修改
    @Override
    public Integer update(Hccg hccg) {
        System.out.println(hccg);
        return hccgMapper.update(hccg);
    }

        // 删除
    @Override
    public Integer delect(Integer id) {
        return hccgMapper.delect(id);
    }


}
